<template>
  <div id="app">
    <el-container>
      <el-header>
        <nav>
          <router-link to="/">首页</router-link> |
          <router-link to="/about">关于</router-link>
        </nav>
      </el-header>
      <el-main>
        <router-view />
      </el-main>
      <el-footer>© 2024 个人主页</el-footer>
    </el-container>
  </div>
</template>

<style lang="scss">
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #2c3e50;
  height: 100vh;
}

.el-header {
  background-color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);

  nav {
    padding: 15px;
    text-align: center;

    a {
      font-weight: bold;
      color: #2c3e50;
      text-decoration: none;
      margin: 0 10px;

      &.router-link-exact-active {
        color: #409eff;
      }
    }
  }
}

.el-main {
  background-color: #f5f7fa;
  min-height: calc(100vh - 120px);
}

.el-footer {
  text-align: center;
  color: #909399;
  padding: 20px;
}
</style>
